package com.woniuxy.carlife.Param;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.List;

/**
 * @ClassName: StoreParam
 *@Description: 接收前端传过来的店铺注册资料
 * @author: yanzhongliang     
 * @date: 2021-04-05
 */

@Data
@ApiModel("注册所需的参数")
@Component
public class StoreParam {

//    @ApiModelProperty(value = "门店id",dataType = "int",example = "1")
//    private Integer storeId;

    @NotNull(message = "门店名不能为空")
    @ApiModelProperty(value = "门店名",dataType = "String",example = "安踏")
    private String storeName;

    @ApiModelProperty(value = "门店服务标签名(前端展示)",dataType = "String",example = "[洗车，美容，改装]")
    private List<String> tagsName;

//    @ApiModelProperty(value = "门店详情id",dataType = "Integer",example = "1")
//    private Integer storeInfoId;

    @NotNull(message = "营业执照不能为空")
    @ApiModelProperty(value = "营业执照路径（在调用营业执照上传接口后返回的路径）",dataType = "String",required = true)
    private String storeBusiness;

    @NotNull(message = "门店手机号不能为空")
    @Size(min =11, max =11, message = "门店手机号长度须11位")
    @ApiModelProperty(value = "门店手机号",dataType = "String",example = "157164166482")
    private String storePhone;

    @NotNull(message = "门店地址不能为空")
    @ApiModelProperty(value = "门店地址",dataType = "String",example = "重庆市大渡口区")
    private String storeAddress;

    @NotNull(message = "精度不能为空")
    @ApiModelProperty(value = "精度",dataType = "BigDecimal",example = "11132.222220.1")
    private BigDecimal storePrecision;

    @NotNull(message = "纬度不能为空")
    @ApiModelProperty(value = "纬度",dataType = "BigDecimal",example = "11132.222220.1")
    private BigDecimal storeLatitude;

    @NotNull(message = "门店图片不能为空")
    @ApiModelProperty(value = "门店图片（在调用门店图片上传接口后返回的路径）",dataType = "String",required = true)
    private String storeInfoImage;

    @NotNull(message = "门店密码不能为空")
    @Max(value = 11, message = "门店密码最大长度为11")
    @Pattern(regexp = "^[a-zA-Z0-9_.-]+@.*\\.[a-zA-Z0-9]{6,11}$", message = "门店密码格式错误，大写字母开头+数字组合，密码为6-11位")
    @ApiModelProperty(value = "门店密码",dataType = "String",example = "A61261661")
    private String storeUserPassword;

    @NotNull(message = "店长名不能为空")
    @ApiModelProperty(value = "店长名",dataType = "String",example = "张三")
    private String storeShopkeeperName;

    @NotNull(message = "门店账号不能为空")
    @Size(min = 5, max = 11, message = "门店账号长度须在5-10之间")
    @ApiModelProperty(value = "门店账号",dataType = "String",example = "694616161")
    private String storeUserAccount;
}
